package org.lg.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author 
 */
@JsonIgnoreProperties(value = {"handler","serialVersionUID"})
public class Course implements Serializable {
    private String cno;

    private String cname;

    private Integer grade;

    private String cdesc;

    private String imgs;

    private static final long serialVersionUID = 1L;

    public Course() {
    }

    public Course(String cno, String cname, Integer grade, String cdesc) {
        this.cno = cno;
        this.cname = cname;
        this.grade = grade;
        this.cdesc = cdesc;
    }

    public String getCno() {
        return cno;
    }

    public void setCno(String cno) {
        this.cno = cno;
    }

    public String getCname() {
        return cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

    public Integer getGrade() {
        return grade;
    }

    public void setGrade(Integer grade) {
        this.grade = grade;
    }

    public String getCdesc() {
        return cdesc;
    }

    public void setCdesc(String cdesc) {
        this.cdesc = cdesc;
    }


    public String getImgs() {
        return imgs;
    }

    public void setImgs(String imgs) {
        this.imgs = imgs;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Course course = (Course) o;
        return Objects.equals(cno, course.cno) &&
                Objects.equals(cname, course.cname) &&
                Objects.equals(grade, course.grade) &&
                Objects.equals(cdesc, course.cdesc) &&
                Objects.equals(imgs, course.imgs);
    }

    @Override
    public int hashCode() {
        return Objects.hash(cno, cname, grade, cdesc, imgs);
    }

    @Override
    public String toString() {
        return "Course{" +
                "cno='" + cno + '\'' +
                ", cname='" + cname + '\'' +
                ", grade=" + grade +
                ", cdesc='" + cdesc + '\'' +
                ", imgs='" + imgs + '\'' +
                '}';
    }
}